home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectMusic / AudioPath / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  1.7 KB  |  41 lines

  1. //-----------------------------------------------------------------------------
  2. // 
  3. // Sample Name: Audio Path Sample
  4. // 
  5. // Copyright (C) 1999-2001 Microsoft Corporation. All rights reserved.
  6. // 
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10. Description
  11. ===========
  12. This sample shows the effects of playing multiple files across different audio
  13. paths, how they can be mixed, and how music is played at the tempo of the primary
  14. audio path.
  15.   
  16. Path
  17. ====
  18.   Source: DXSDK\Samples\Multimedia\VBSamples\DirectMusic\vbAudioPath
  19.  
  20.   Executable: DXSDK\Samples\Multimedia\VBSamples\DirectMusic\bin
  21.  
  22.  
  23. User's Guide
  24. ============
  25. You may add one file to the 'Primary' audio path, and 0 to 5 files to each of the two
  26. secondary audio paths.  Each audio path can be played separately and has separate controls
  27. for volume and 3D positioning.
  28.  
  29. Programming Notes
  30. =================
  31. At the start of the application we create 3 default audio paths.  We allow 1 audio file 
  32. to be loaded into the first audio path, and 0 to 5 loaded in each of the next two.  When
  33. Play is clicked on the first audio path, we call PlaySegmentEx with the DMUS_SEGF_DEFAULT
  34. flag to clarify that this is the primary segment.  Each of the other audio paths call
  35. PlaySegmentEX with the DMUS_SEGF_SECONDARY flag to play as secondary segments.
  36.  
  37. If Looping is selected on an audio path we call SetRepeats with INIFINITE, otherwise we 
  38. call SetRepeats with 0.  To change the volume or 3D Positioning of any audio path we first
  39. call GetObjectInPath to retreive a DirectSoundSecondaryBuffer or DirectSound3DBuffer, and 
  40. then call SetVolume or SetPosition, respectively.
  41.